package njust.csc.aeapi.dao

import jakarta.transaction.Transactional
import njust.csc.aeapi.entity.AnalysisOrder
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Modifying
import org.springframework.stereotype.Repository

/**
 * @Author ZhouHang
 * @Date 24/6/20 周四
 */
@Repository
interface AnalysisOrderRepository: JpaRepository<AnalysisOrder, Int> {
    fun findByAnalysisNo(analysisNo: String): AnalysisOrder?

    fun findByApkName(apkName: String): AnalysisOrder?

    fun findAllByApkName(apkName: String): List<AnalysisOrder>

    @Modifying
    @Transactional
    fun deleteAnalysisOrderByAnalysisNo(analysisNo: String)
}
